/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.vista;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author z
 */
@ManagedBean
@SessionScoped
public class AccessBean {
    //--------variables(propiedades)
private String name;
private String password;
   //---------constructores
    public AccessBean() {
    }
//----------metodos get y set
      public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    //-------- Acciones ---------------------------------------
    public String validarLogin(){
       if(name.equals("zaira")&&password.equals("12345")){
        return "MenuPrincipal";
       
       }else{
     return "Pagina2";
    
      }
    }
}
    